home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
c
/
restracklib_0_2.lha
/
ResTrackLib
/
lists.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-31
|
2KB
|
58 lines
/******************************************************************************
MODUL
lists.h
DESCRIPTION
Tools/Macros fuer Exec-Listen
******************************************************************************/
#ifndef LISTS_H
#define LISTS_H
/***************************************
Includes
***************************************/
#ifndef EXEC_LISTS_H
# include <exec/lists.h>
#endif
/***************************************
Globale bzw. externe Variable
***************************************/
/***************************************
Defines und Strukturen
***************************************/
/* DICE defines these (but this file hides the other definition) */
#define GetHead(list) ((APTR) \
(((struct List *)(list))->lh_Head->ln_Succ ? \
((struct List *)(list))->lh_Head : NULL ))
#define GetTail(list) ((APTR) \
(((struct List *)(list))->lh_TailPred->ln_Succ ? \
((struct List *)(list))->lh_TailPred : NULL ))
#define GetPred(node) ((APTR) \
(((struct Node *)(node))->ln_Pred->ln_Pred ? \
((struct Node *)(node))->ln_Pred : NULL ))
#define GetSucc(node) ((APTR) \
(((struct Node *)(node))->ln_Succ->ln_Succ ? \
((struct Node *)(node))->ln_Succ : NULL ))
#define InitList(name) { (struct Node *)&(name).lh_Tail, 0, (struct Node *)&(name).lh_Head }
#define InitMinList(name) { (struct MinNode *)&(name).mlh_Tail, 0, (struct MinNode *)&(name).mlh_Head }
/***************************************
Prototypes
***************************************/
#endif /* LISTS_H */
/******************************************************************************
***** ENDE lists.h
******************************************************************************/